/*
 * Email Notify
 * Copyright: (C) 2008 by Antonio Nastasi
 * Email: sifcenter (at) gmail.it
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef ACCOUNT_H
#define ACCOUNT_H


#include <KConfigGroup>

class Account : public QObject
{
  Q_OBJECT

  public:
                        Account( KConfigGroup &config );
                        ~Account();
    const QString&      getLogin() const;
    const QString&      getPassword() const;
    const QString&      getServer() const;
    int                 getPort() const;
    const QString&      getProtocol() const;
    bool                isSSL() const;
    int                 getInterval() const;
    const QString&      getSoundFile() const;
    //bool              getAnimate() const;
    int                 getPosition() const;
    bool                getShortCaption() const;
    bool                getBalloon() const;
    int                 getCurrentEmails() const;
    void                setCurrentEmails( int currentEmails );
    const QFont&        getFont() const;
    const QColor&       getFontColor() const;
    const QString&      getClientEmail() const;
    void                setShortCaption( bool mode );

  private:
    KConfigGroup        generalGroup_;
    QString             login_;
    QString             password_;
    QString             server_;
    int                 port_;
    QString             protocol_;
    bool                ssl_;
    int                 interval_;
    QString             soundFile_;
    //bool              animate_;
    int                 position_;
    bool                shortCaption_;
    //bool              balloon_;
    int                 currentEmails_;
    QFont               font_;
    QColor              fontColor_;
    QString             clientEmail_;

  public slots:
    void                slotReadConfig();

  signals:
    void                accountUpdated();
    void                currentEmailsChanged();
    void                newEmailReceived();
};

#endif
